package be.gnx.logging4eclipse.perspective;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import be.gnx.logging4eclipse.perspective.view.Logging4EclipseView;
import be.gnx.logging4eclipse.perspective.view.LoggingEntriesView;
import be.gnx.logging4eclipse.perspective.view.LoggingEntryView;

public class Perspective implements IPerspectiveFactory {

  public void createInitialLayout(IPageLayout layout) {
    layout.setEditorAreaVisible(false);
    IFolderLayout folderLeft = layout.createFolder("folderLogging4Eclipse",
        IPageLayout.LEFT, 0.8f, layout.getEditorArea());
    folderLeft.addView(Logging4EclipseView.class.getName());
    IFolderLayout foLeftTop = layout.createFolder("folderLogging4Entries",
        IPageLayout.RIGHT, 0.2f, "folderLogging4Eclipse");
    foLeftTop.addView(LoggingEntriesView.class.getName());
    IFolderLayout foRightTop = layout.createFolder("folderLogging4Entry",
        IPageLayout.BOTTOM, 0.5f, "folderLogging4Entries");
    foRightTop.addView(LoggingEntryView.class.getName());
  }

}
